function heat_transfer_rate = concentric_pipes_heat_transfer(material, fluid1, fluid2, geometry)
    % Inputs:
    % material: structure containing material properties 'k'
    % fluid1: s-'h1'
    % fluid2: -'h2'
    % geometry-[r1, r2, L]
    
    % Extracting variables from input structures
    r1 = geometry.r1; 
    r2 = geometry.r2;
    L = geometry.L;    

    % Thermal conductivity of the pipe material (W/mK)
    k = material.k;   

    % Convective heat transfer coefficient (W/m^2K)
    h1 = fluid1.h;     
    h2 = fluid2.h;   
    
    % Temperatures *C
    T_inlet = fluid1.T_inlet;   
    T_outlet = fluid2.T_outlet; 
    
    % Calculate surface areas (m^2)
    A1 = 2 * pi * r1 * L;  
    A2 = 2 * pi * r2 * L; 
    
    %Calculate convective resistance inside the inner pipe
    R_conv1 = 1 / (h1 * A1);
    
    %Calculate conductive resistance through the pipe wall
    R_cond = log(r2 / r1) / (2 * pi * k * L);
    
    % Calculate convective resistance in the annular region
    R_conv2 = 1 / (h2 * A2);
    
    % Calculate total thermal resistance
    R_total = R_conv1 + R_cond + R_conv2;
    
    % Calculate heat transfer rate
    q = (T_inlet - T_outlet) / R_total; % Heat transfer rate (W)
    
    fprintf('Total Thermal Resistance: %.4f K/W\n', R_total);
    fprintf('Heat Transfer Rate: %.4f W\n', q);
    
    % Output heat transfer rate
    heat_transfer_rate = q;
end